package com.leetone.testng;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.How;

/**
 * @ProjectName: testng
 * @Package: com.leetone.testng
 * @ClassName: OkrPage
 * @Description: 【】
 * @Author: 谭磊
 * @Email: leetone123@163.com
 * @CreateDate: 2018/11/6 10:19
 * @UpdateUser: 更新者：
 * @UpdateDate: 2018/11/6 10:19
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */
public class OkrPage extends BasePage {
    public OkrPage(WebDriver driver){super(driver);}

    @FindBy(how =How.NAME,name="email")
    private WebElement email;//用户名
    @FindBy(how =How.NAME,name="password")
    private WebElement password;//密码
    @FindBy(how=How.XPATH,xpath="//button[1]")
    private WebElement loginbutton;//登录按钮
    /**
     * 输入邮箱
     */
    public void sendEmail(String s){
        this.sendkeys(email,s);
    }

    /**
     * 输入密码
     */
    public void sendPass(String s){
        this.sendkeys(password,s);
    }

    /**
     * 点击登录
     */
    public void loginClick(){
        this.click(loginbutton);
    }
}